
import { http } from '@/utils/http'

let FixApi = ''
if (process.env.NODE_ENV == 'development') {
  FixApi = '/web' //开发环境
} else {
  FixApi = '/web' //生产环境
}

/* 获取组织架构 */
export const queryCompanyAndDepart = () => {
  return http({
    method: 'POST',
    url: `${FixApi}/org/huidaOrgCompany/queryCompanyAndDepart.json`,
  })
}
/* 领导获取组织架构下的人 */
export const querySubDepartTree = () => {
  return http({
    method: 'POST',
    url: `${FixApi}/org/huidaOrgDepart/querySubDepartTree.json`,
  })
}

//通过employeeCode 获取userCode
export const getEmployeePageByCode = (employeeCode : string) => {
  return http({
    method: 'POST',
    url: `${FixApi}/org/employee/getEmployeePageByCode.json`,
    data:{
      employeeCode
    }
  })
}
